package com.wzb.controller;

import com.wsw.service.StuService;
import com.wsw.entity.Stu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/student")
@CrossOrigin
public class stuController {
    @Autowired
    private StuService studentService;
    @GetMapping("/list")
    public List<Stu> findStudent(){
        return studentService.list();
    }
}
